{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Tarmacking Shifts (solved)\n", "The firm MMM has obtained a contract to pave the streets in the centre of Exeter. The Department of Traffic Engineering and Planning estimated that at least the number of employees indicated in the table below are required for each 4-h interval\n", "over a standard 24-h period.\n", "All of MMM’s members of staff work 8-h ongoing shifts. There are six feasible shifts which begin on the starting hour of the 4-h intervals indicated in the table. All the members of staff are paid the same salary per hour, except those working between\n", "20:00 h and 00:00 h, who receive a 50 % increase. Moreover, the salary per hour is 100 % higher between 00:00 h and 06:00 h.\n", "\n", "| Time period | Required Personnel |\n", "|--------------|--------------------|\n", "| 06–10 | 70 |\n", "| 10–14 | 20 |\n", "| 14–18 | 80 |\n", "| 18–22 | 30 |\n", "| 22–02 | 10 |\n", "| 02–06 | 10 |\n", "\n", "**a)** Consider a linear programming model that can determine how many employees are required in all six shifts in order to minimise the cost of MMM’s salaries to meet the personnel requirements.\n", "\n", "### Decision variables\n", "In this case, we need to decide how many employees work on each shift. Therefore, the decision variables are:\n", "\n", "$X_{j}$: (Integer) Number of employees in shift j, $j=[1,...,6]$\n", "\n", "### Objective function\n", "\n", "The objective is to minimise the cost: \n", "\n", "$\\min z = \\sum_{j=1}^{6}C_{j}*X_{j}$\n", "\n", "The cost per shift depends on the hourly costs. If we define the base hour cost as C, and taking into account that employees get 50% extra between 20:00 and 00:00 and double the money between 00:00 and 06:00, we can calculate the cost of every shift as:\n", "\n", "$X_{1}$ (06:00 - 14:00) $\\rightarrow C_{1}= 8·C$\n", "\n", "$X_{2}$ (10:00 - 18:00) $\\rightarrow C_{2}= 8·C$\n", "\n", "$X_{3}$ (14:00 - 22:00) $\\rightarrow C_{3}= 6·C+1.5·2·C=9·C$\n", "\n", "$X_{4}$ (18:00 - 02:00) $\\rightarrow C_{4}= 2·C +4·1.5·C+2·2·C=12·C$\n", "\n", "$X_{5}$ (22:00 - 06:00) $\\rightarrow C_{5}= 2·1.5·C + 6·2·C = 15·C$\n", "\n", "$X_{6}$ (02:00 - 10:00) $\\rightarrow C_{6}= 4·2·C + 4·C = 12·C$\n", "\n", "### Constraints\n", "Now, we have six constraints, and taking into account that the employees work for two time periods straight:\n", "\n", "$X_{6}+X_{1} \\geq 70$\n", "\n", "$X_{1}+X_{2} \\geq 20$\n", "\n", "$X_{2}+X_{3} \\geq 80$\n", "\n", "$X_{3}+X_{4} \\geq 30$\n", "\n", "$X_{4}+X_{5} \\geq 10$\n", "\n", "$X_{5}+X_{6} \\geq 10$\n", "\n", "**b)** The temporary work ETS firm offers the members of staff more flexible working hours, with 4-h shifts beginning on the hour at the start of all the 4-h periods in the table. The cost of using ETS’ staff is the same at all the times considered, but is 80 % higher than the daily cost of MMM’s members of staff for each shift. MMM wishes to know if there would be any profit made if ETS was used. Amend the former model to determine the optimum mix of using MMM’s and ETS’ staff in order to minimise the costs incurred to MMM through salaries and to meet the personnel requirements.\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, the ETS employees only work on 4h shifts, their hourly costs are fixed, but at the same time, 80% higher than the base hourly cost of normal employees. We have again six new shifts, and therefore, 6 new decision variables:\n", "\n", "$Xe_{j}$: (Integer) Number of ETS employees in shift j, $j=[1,...,6]$\n", "\n", "Now, we need to amend the objective function to account for this new employees, since the hourly costs are fixed, there is no need to calculate it:\n", "\n", "$\\min z = \\sum_{j=1}^{6}C_{j}*X_{j} + \\sum_{j=1}^{6}1.8·C*Xe_{j}$\n", "\n", "As for the constraints, we simply introduce the ETS employees in every shift:\n", "\n", "$X_{6}+X_{1}+Xe_{1} \\geq 70$\n", "\n", "$X_{1}+X_{2}+Xe_{2} \\geq 20$\n", "\n", "$X_{2}+X_{3}+Xe_{3} \\geq 80$\n", "\n", "$X_{3}+X_{4}+Xe_{4} \\geq 30$\n", "\n", "$X_{4}+X_{5}+Xe_{5} \\geq 10$\n", "\n", "$X_{5}+X_{6}+Xe_{6} \\geq 10$" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "pycharm": { "stem_cell": { "cell_type": "raw", "source": [], "metadata": { "collapsed": false } } } }, "nbformat": 4, "nbformat_minor": 2 }